package com.pingan.haofang.searchcloud.common.fetch;

/**
 * 流式抓取汇总信息
 * 
 * @author luyi374
 * @date 2017年4月12日
 * @since 1.0.0
 */
public class StreamFetchGatherInfo {

    /**
     * 预估总记录数
     */
    private long estimateTotalCount;

    /**
     * 实际处理总记录数
     */
    private long totalCount;

    /**
     * 成功总数
     */
    private long successCount;

    /**
     * 失败总数
     */
    private long failCount;

    public void addFetchCount() {
        addFetchCount(1);
    }

    public void addFetchCount(int num) {
        totalCount += num;
        successCount += num;
    }

    public void addFailCount() {
        addFailCount(1);
    }

    public void addFailCount(int num) {
        totalCount += num;
        failCount += num;
    }

    public long getTotalCount() {
        return totalCount;
    }

    public long getSuccessCount() {
        return successCount;
    }

    public long getFailCount() {
        return failCount;
    }

    public long getEstimateTotalCount() {
        return estimateTotalCount;
    }

    public void setEstimateTotalCount(long estimateTotalCount) {
        this.estimateTotalCount = estimateTotalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public void setSuccessCount(long successCount) {
        this.successCount = successCount;
    }

    public void setFailCount(long failCount) {
        this.failCount = failCount;
    }

    @Override
    public String toString() {
        return "StreamFetchGatherInfo{" +
                "estimateTotalCount=" + estimateTotalCount +
                ", totalCount=" + totalCount +
                ", successCount=" + successCount +
                ", failCount=" + failCount +
                '}';
    }

}
